package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/10/24.
 */
@Entity
@Table(name = "channel_type")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class ChannelType extends IDEntityMall {


    @Column(columnDefinition = "bigint(20) comment '父级分类ID'")
    private Long parentId;

    @Column(columnDefinition = "varchar(255) comment '分类名称'")
    private String typeName;

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Override
    public String toString() {
        return "ChannelType{" +
                "parentId=" + parentId +
                ", id=" + id +
                ", typeName='" + typeName + '\'' +
                ", dateCreated=" + dateCreated +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
